/* 
 * File: xmlpersister.h
 * Project: QTimeTracker
 * Author: Steve Sindelar, http://stevesindelar.cz
 * Licence: NewBSD licence.
 */

#ifndef XMLPERSISTER_H
#define XMLPERSISTER_H

#include "persister.h"
#include "item.h"
#include <QList>

namespace Core
{

	/**
	 * Persists list of Item into xml file.
	 * Filename is passed as constructor parameter.
	 */
	class XmlPersister : public virtual Persister
	{
	public:
		XmlPersister(QString filename);

		void save(QList<Item*> items);
		QList<Item*> load();

	private:
		QString filename;
	};

}

#endif //XMLPERSISTER_H
